package edu.bw.service.Impl;

import edu.bw.config.SpringConfig;
import edu.bw.po.Product;
import edu.bw.service.ProductService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;

import static org.junit.jupiter.api.Assertions.*;

@SpringJUnitConfig(SpringConfig.class)
class ProductServiceImplTest02 {

    @Autowired
    private ProductService productService;

    @Test
    void updateProduct() {
        productService.updateProduct(new Product(13, "索尼单反相机",
                6999.00, "数码相机"));

    }

    @Test
    void findAll() {
        productService.findAll().forEach(System.out::println);
    }
}